import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

abstract class Themes {
  static final TextTheme _textTheme =
      const TextTheme(bodyMedium: TextStyle(color: Color(0xFFCCCCCC), fontSize: 20, height: 26 / 20)).apply();

  static ThemeData normalTheme(BuildContext context) => ThemeData.light(useMaterial3: true).copyWith(
      scaffoldBackgroundColor: Colors.white,
      colorScheme: const ColorScheme.light().copyWith(
        onBackground: Colors.white,
      ),
      textTheme: _textTheme,
      cardTheme: CardTheme(
        color: const Color(0xFF494949),
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(23)),
      ),
      elevatedButtonTheme: ElevatedButtonThemeData(
          style: ButtonStyle(
        backgroundColor: const MaterialStatePropertyAll(Color(0xFF282828)),
        foregroundColor: MaterialStateProperty.resolveWith((states) {
          if (states.contains(MaterialState.focused)) {
            return Colors.black;
          }
          return Colors.white;
        }),
        minimumSize: const MaterialStatePropertyAll(Size(300, 55)),
        shape: MaterialStateProperty.resolveWith((states) {
          var border = RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(12),
          );
          if (states.contains(MaterialState.focused)) {
            return border.copyWith(
                side: const BorderSide(
              color: Colors.white,
              width: 2,
            ));
          }
          return border;
        }),
        overlayColor: MaterialStateProperty.resolveWith((states) {
          if (states.contains(MaterialState.focused)) {
            return const Color(0xFFFCD036);
          }
          return null;
        }),
      )));
}
